#ifndef _GMAIL_H
#define _GMAIL_H

#include <libxml/SAX.h>
#include "dwmstatus_types.h"

#define UNAVAILABLE "Unavailable"
#define FULL_COUNT "fullcount"

struct mail {
  String unread;
  char *current_buffer;
};
typedef struct mail Mail;

void set_gmail(char *);
void get_gmail(char *, size_t);
void gmail_start();
void gmail_format_mail(Mail *);
void gmail_update_mail();
void *gmail_loop(void *);
void gmail_sax_on_start(void *, const xmlChar *, const xmlChar *, const xmlChar *, const int, const xmlChar **, int, int, const xmlChar **);
void gmail_sax_on_end(void *, const xmlChar*, const xmlChar*, const xmlChar *);
void gmail_sax_on_char(void *data, const xmlChar *ch, int len);
void gmail_set_sax_handler(xmlSAXHandler *);


#endif
